extends RefCounted


class_name EventProcessor


@export var unique: EffectValue = null
@export var effects: Array[EffectValue] = []


func do_event(character: CharacterComponent, meta: Dictionary[String, Variant]) -> bool:
    var e: CharacterEvent = CharacterEvent.new()
    e.meta = meta
    if unique:
        unique.behavior.do_event(character, unique, e)
    for effect in effects:
        effect.behavior.do_event(character, effect, e)
    return e.is_canceled
